package Code.ExtendDemo.Test2;

import javax.xml.transform.Source;
import java.lang.module.ResolutionException;

public class Dog {
        private String name;

    public Dog() {
    }

    public Dog(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //吃饭
    public void eat(){
        System.out.println(name+"在吃狗粮");
    }

    //喝水
    public void drink(){
        System.out.println(name+"在喝水");
    }

    //看家
    public void lookHome(){
        System.out.println(name+"在看家");
    }
}

